package cn.wendellup.bootStrap.valueobject.vo;

import java.io.Serializable;

import cn.wendellup.bootStrap.service.contract.IFileService;
import cn.wendellup.bootStrap.util.Urls;
import cn.wendellup.bootStrap.valueobject.constants.FileUsedType;
import cn.wendellup.bootStrap.valueobject.entity.AdvDetail;

public class AdvDetailVo implements Serializable{
	private static final long serialVersionUID = 8746988278567922426L;
	private long id;
    private int positionTypeId;
    private int advType;
    private int recordType;
    private String picPath = "";
    private String linkUrl = "";
    private String description = "";
    private String title = "";
    
    public AdvDetailVo(){
    	
    }
    public AdvDetailVo(AdvDetail advDetail, IFileService fileServiceImpl){
    	this.id = advDetail.getId();
    	this.positionTypeId = advDetail.getPositionTypeId();
    	this.advType = advDetail.getAdvType();
    	this.recordType = advDetail.getRecordType();
//    	this.picPath = advDetail.getEfsId();//
    	this.picPath = Urls.getInstance().getFileUrlByEfsId(fileServiceImpl,
    			advDetail.getEfsId(), FileUsedType.adver_photo
    			, FileUsedType.adver_photo);
    	this.linkUrl = advDetail.getLinkUrl();
    	this.description = advDetail.getDescription();
    	this.title = advDetail.getTitle();
    }
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public int getPositionTypeId() {
		return positionTypeId;
	}
	public void setPositionTypeId(int positionTypeId) {
		this.positionTypeId = positionTypeId;
	}
	public int getAdvType() {
		return advType;
	}
	public void setAdvType(int advType) {
		this.advType = advType;
	}
	public int getRecordType() {
		return recordType;
	}
	public void setRecordType(int recordType) {
		this.recordType = recordType;
	}
	public String getPicPath() {
		return picPath;
	}
	public void setPicPath(String picPath) {
		this.picPath = picPath;
	}
	public String getLinkUrl() {
		return linkUrl;
	}
	public void setLinkUrl(String linkUrl) {
		this.linkUrl = linkUrl;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
    
    
}
